import request from '@/config/axios'

// 人员名单 VO
export interface PersonnelListVO {
  id: number // 序号
  name: string // 姓名
  education: string // 学历
  vocationalQualification: string // 职业资格
  title: string // 职称
  duty: string // 职务
  remark: string // 备注
}

// 人员名单 API
export const PersonnelListApi = {
  // 查询人员名单分页
  getPersonnelListPage: async (params: any) => {
    return await request.get({ url: `/eval/personnel-list/page`, params })
  },

  // 查询人员名单详情
  getPersonnelList: async (id: number) => {
    return await request.get({ url: `/eval/personnel-list/get?id=` + id })
  },

  // 新增人员名单
  createPersonnelList: async (data: PersonnelListVO) => {
    return await request.post({ url: `/eval/personnel-list/create`, data })
  },

  // 修改人员名单
  updatePersonnelList: async (data: PersonnelListVO) => {
    return await request.put({ url: `/eval/personnel-list/update`, data })
  },

  // 删除人员名单
  deletePersonnelList: async (id: number) => {
    return await request.delete({ url: `/eval/personnel-list/delete?id=` + id })
  },

  // 导出人员名单 Excel
  exportPersonnelList: async (params) => {
    return await request.download({ url: `/eval/personnel-list/export-excel`, params })
  }
}